#ifndef WIDGET_H
#define WIDGET_H

#include <QtWidgets>

namespace Ui {
class Widget;
}
class Automation;

class Widget : public QWidget
{
    Q_OBJECT

public:
    explicit Widget(QWidget *parent = 0);
    ~Widget();
protected:
//    virtual void closeEvent(QCloseEvent *event);
    void generate(QStringList &accounts);
private slots:
//    void onSystemTrayClicked(QSystemTrayIcon::ActivationReason reason);
//    void onTrayMsgClicked();
    void onActQuitApp();
    void onPlayerToggled(bool checked);
    void onStopClicked(bool checked);

    void onHalt(QString msg);
    void onHold(QString msg);
    void onFinished();
private:
    Ui::Widget *ui;
//    QSystemTrayIcon *tray_;
    Automation *automate_;
    bool playFlag_;  //指示宏观意图.
};

#endif // WIDGET_H
